'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    const data = [
      {
        CourseId: 1,
        name: '章节1',
        videoUrl: 'https://img1.sycdn.imooc.com/szimg/1b73076708b7ee5605400304.jpg',
        introduce: '前端高手成长课-从业务深挖到代码架构设计方案落地',
        content: '章节1-内容',
        rank: 1,
        createdAt: new Date(),
        updatedAt: new Date()
      },
      {
        CourseId: 1,
        name: '章节2',
        videoUrl: 'https://img1.sycdn.imooc.com/szimg/1b73076708b7ee5605400304.jpg',
        introduce: '前端高手成长课-从业务深挖到代码架构设计方案落地',
        content: '章节2-内容',
        rank: 2,
        createdAt: new Date(),
        updatedAt: new Date()
      },
      {
        CourseId: 1,
        name: '章节3',
        videoUrl: 'https://img1.sycdn.imooc.com/szimg/1b73076708b7ee5605400304.jpg',
        introduce: '前端高手成长课-从业务深挖到代码架构设计方案落地',
        content: '章节3-内容',
        rank: 3,
        createdAt: new Date(),
        updatedAt: new Date()
      },
    ]
    await queryInterface.bulkInsert('Chapters',data, {})
  },

  async down (queryInterface, Sequelize) {
    await queryInterface.bulkDelete('Chapters', null, {});
  }
};
